<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    /* 
        JavaScript中变量的类型取决于存储的数据的类型
    */
    var num = 1;
    var str = "hello";
    var b1 = true;
    //变量声明了，但没有赋值
    var u1 = undefined;
    //空对象
    var n1 = null;

    //使用typeof来进行变量类型的判断
    console.log(typeof(num));
    console.log(typeof(str));
</script>
</html>